package com.bosi.exmple.chat.entity;

import com.bosi.exmple.message.Message;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@ToString
@Data
@NoArgsConstructor
@AllArgsConstructor
public class WSResponse implements Serializable {
    int id;
    String act;
    Object data;
    int code;
    String msg;

    public static WSResponse createChannel(List<String> channel){
        return new WSResponse(0,"channel",channel,200,null);
    }

    public static WSResponse createMessage(Message message) {
        return new WSResponse(0,"message",message,200,null);
    }
}
